package main

import (
	"chuanyou/db"
	_ "chuanyou/routers"
	"fmt"

	beego "github.com/beego/beego/v2/server/web"
)

func main() {
	copyRight, err := beego.AppConfig.String("copyRight")
	if err != nil {
		fmt.Println("获取配置文件copyRight 出错，错误是: ", err.Error())
		return
	}
	fmt.Println("版权所有：", copyRight)
	if db.ConnectDB() != nil {
		fmt.Println("程序启动失败")
		return
	}
	fmt.Println("程序启动成功")
	beego.Run()
}
